package com.keven.dp.prototype;

import java.io.IOException;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Prototype obj= new Prototype();
		obj.setString("nihao");
//		obj.setObj((SerializableObject)"fff");
		System.out.println(obj+"    "+obj.getString());
		try {
			Prototype obj2=(Prototype)obj.clone();
			System.out.println(obj2+"   "+obj2.getString());
		} catch (CloneNotSupportedException e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		
		try {
			Prototype obj3= (Prototype)obj.deepClone();
			System.out.println(obj3+"  "+obj3.getString());
		} catch (ClassNotFoundException e) {
			// TODO: handle exception
		}catch (IOException e) {
			// TODO: handle exception
		}
		
	}

}
